//功能区交互//////////////////////////////////////////
var playerPropId;
//角色对话框2---------------------------------
//仓库商品只能销售
function playerWarehouseOperate(x) {
	let item = current_player_farm_warehouse_detail.get('warehouse_' + x);
	let id = item.id;
	if (checkEmpty(item)) {//判断是否有效
		return;
	}
	//显示交互功能
	reset_point('playerGameCommonActionDiv');
	$('#player_game_interact_action_title').html('选择');
	let dom = $('#player_game_interact_action_btns');
	dom.html('');
	let str = '';
	str = str + '<span class="player-fight-action" onclick="doPlayerInteractAction(11,\''+id+'\')">[出售]</span>';
	
	dom.append(str);
	$('#playerGameCommonActionDiv').removeClass('dn');
}

//口袋东西只能销毁
function playerPocketOperate(x) {
	let item = current_player_farm_pocket_detail.get('pocket_' + x);
	let id = item.id;
	if (checkEmpty(item)) {//判断是否有效
		return;
	}
	//显示交互功能
	reset_point('playerGameCommonActionDiv');
	$('#player_game_interact_action_title').html('选择');
	let dom = $('#player_game_interact_action_btns');
	dom.html('');
	let str = '';
	str = str + '<span class="player-fight-action" onclick="doPlayerInteractAction(21,\''+id+'\')">[使用]</span>';
	str = str + '<span class="player-fight-action" onclick="doPlayerInteractAction(22,\''+id+'\')">[销毁]</span>';
	
	dom.append(str);
	$('#playerGameCommonActionDiv').removeClass('dn');
}

//商店东西只能购买
function playerStoreOperate(x) {
	let item = current_game_store_detail.get('store_' + x);
	let id = item.id;
	if (checkEmpty(item)) {//判断是否有效
		return;
	}
	//显示交互功能
	reset_point('playerGameCommonActionDiv');
	$('#player_game_interact_action_title').html('选择');
	let dom = $('#player_game_interact_action_btns');
	dom.html('');
	let str = '';
	str = str + '<span class="player-fight-action" onclick="doPlayerInteractAction(31,\''+id+'\')">[购买]</span>';
	
	dom.append(str);
	$('#playerGameCommonActionDiv').removeClass('dn');
}

//好友只能查看
function playerFriendOperate(x) {
	let item = current_player_friend_detail.get('friend_' + x);
	let id = item.id;
	if (checkEmpty(item)) {//判断是否有效
		return;
	}
	//显示交互功能
	reset_point('playerGameCommonActionDiv');
	$('#player_game_interact_action_title').html('选择');
	let dom = $('#player_game_interact_action_btns');
	dom.html('');
	let str = '';
	str = str + '<span class="player-fight-action" onclick="doPlayerInteractAction(41,\''+id+'\')">[查看]</span>';
	
	dom.append(str);
	$('#playerGameCommonActionDiv').removeClass('dn');
}

//添加好友
function playerChatFriendOperate(id) {
	closePlayerFriendDiv();
	if (checkEmpty(id)||currentPlayerId==id) {//判断是否有效
		return;
	}
	//显示交互功能
	reset_point('playerGameFriendActionDiv');
	$('#player_game_friend_action_title').html('选择');
	let dom = $('#player_game_friend_action_btns');
	dom.html('');
	let str = '';
	str = str + '<span class="player-fight-action" onclick="doPlayerFriendAction(10,\''+id+'\')">[添加好友]</span>';
	
	dom.append(str);
	$('#playerGameFriendActionDiv').removeClass('dn');
}

